<!--
 * @Author: your name
 * @Date: 2021-05-31 21:39:34
 * @LastEditTime: 2021-06-27 22:36:03
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \JS高级学习\js\promise\35.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <title>后盾人</title>
</head>

<body></body>
<script src="js/ajax.js"></script>
<script>
  // class User {
  //   constructor(name) {
  //     this.name = name;
  //   }
  //   then(resolve, reject) {
  //     let user = ajax(`http://localhost:8888/php/user.php?name=${this.name}`);
  //     resolve(user);
  //   }
  // }
  // async function get() {
  //   let user = await new User("后盾人");
  //   console.log(user);
  // }
  // get();

  for (var i = 0; i < 5; i++) {
    setTimeout(function () {
      console.log(i);
    }, 900);
  }
</script>

</html>